package com.hurr.service.impl;

import java.util.Collection;

import com.hurr.bo.Bank;
import com.hurr.dao.BankDao;
import com.hurr.service.BankService;

/**
 * Implemetation for Bank Service
 * 
 * @author Fernando Perelli
 * 
 */
public class BankServiceImpl implements BankService {

	/**
	 * Dao for bank
	 */
	private BankDao bankDao;

	/**
	 * Set BankDao
	 * 
	 * @param bankDao
	 */
	public void setBankDao(BankDao bankDao) {
		this.bankDao = bankDao;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see com.hurr.service.BankService#save(com.hurr.bo.Bank)
	 */
	@Override
	public Bank save(Bank bank) {
		return bankDao.save(bank);
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see com.hurr.service.BankService#update(com.hurr.bo.Bank)
	 */
	@Override
	public void update(Bank bank) {
		bankDao.update(bank);
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see com.hurr.service.BankService#delete(com.hurr.bo.Bank)
	 */
	@Override
	public void delete(Bank Bank) {
		bankDao.delete(Bank);
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see com.hurr.service.BankService#findById(java.lang.Long)
	 */
	@Override
	public Bank findById(Long id) {
		return bankDao.findById(id);
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see com.hurr.service.BankService#findAll()
	 */
	@Override
	public Collection<Bank> findAll() {
		return bankDao.findAll();
	}

}
